 import React  from "react";
 import {Outlet}from'react-router-dom'//输出子路由 
  import {  Layout, theme } from 'antd';
  import CommonAside from '../components/commonAside/index'
  import CommonHeader from '../components/commonHeader/index'
  import {useSelector} from 'react-redux' 
  import CommonTag from "../components/CommonTag/index";
  const {Content } = Layout; 

 const Main=()=>{
    // const [collapsed, setCollapsed] = useState(false);
    const {
      token: { colorBgContainer, borderRadiusLG },
    } = theme.useToken();
    
  const collapsed= useSelector(state=>state.tab.isCollapsed)

    return (
      <Layout className="main-container"> 
        <CommonAside collapsed={collapsed}/> 
        <Layout>
        <CommonHeader collapsed={collapsed}/>
        <CommonTag/>
          <Content
            style={{
              margin: '24px 16px',
              padding: 24,
              minHeight: 280,
              background: colorBgContainer,
              borderRadius: borderRadiusLG,
            }}
          >
            <Outlet></Outlet>
          </Content>
        </Layout>
      </Layout>
    )
 }
 export default Main